<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the Number of Tidy warnings encountered for specified document</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.tidy-get-output.html">« tidy_get_output</a></li>
      <li style="float: right;"><a href="book.tokenizer.html">Tokenizer »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.tidy.html">Tidy 函数</a></li>
    <li>Returns the Number of Tidy warnings encountered for specified document</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.tidy-warning-count" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">tidy_warning_count</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8, PECL tidy &gt;= 0.5.2)</p><p class="refpurpose"><span class="refname">tidy_warning_count</span> &mdash; <span class="dc-title">Returns the Number of Tidy warnings encountered for specified document</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.tidy-warning-count-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>tidy_warning_count</strong></span>(<span class="methodparam"><span class="type"><a href="class.tidy.html" class="type tidy">tidy</a></span> <code class="parameter">$tidy</code></span>): <span class="type">int</span></div>

  <p class="para rdfs-comment">
   Returns the number of Tidy warnings encountered for the specified document.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.tidy-warning-count-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">tidy</code></dt>

     <dd>

      <p class="para">
       The <span class="classname"><a href="class.tidy.html" class="classname">Tidy</a></span> 对象。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.tidy-warning-count-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the number of warnings.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.tidy-warning-count-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3823">
    <p><strong>示例 #1 <span class="function"><strong>tidy_warning_count()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$html&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;p&gt;test&lt;/i&gt;<br />&lt;bogustag&gt;bogus&lt;/bogustag&gt;'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$tidy&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">tidy_parse_string</span><span style="color: #007700">(</span><span style="color: #0000BB">$html</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #0000BB">tidy_error_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$tidy</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//1<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">tidy_warning_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$tidy</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//5<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.tidy-warning-count-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.tidy-error-count.html" class="function" rel="rdfs-seeAlso">tidy_error_count()</a> - Returns the Number of Tidy errors encountered for specified document</span></li>
    <li class="member"><span class="function"><a href="function.tidy-access-count.html" class="function" rel="rdfs-seeAlso">tidy_access_count()</a> - Returns the Number of Tidy accessibility warnings encountered for specified document</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>